﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BookManage.Model
{
    /// <summary>
    /// 实体类ReaderType
    /// </summary>
    public class ReaderType
    {
        public ReaderType() { }
        #region 公有属性
        public int rdType { get; set; }
        public String rdTypeName { get; set; }
        public int CanLendQty { get; set; }
        public int CanLendDay { get; set; }
        public int CanContinueTimes { get; set; }
        public float PunishRate { get; set; }
        public int DateValid { get; set; }
        #endregion
        public static string ColumnTitle(string columnName)
        {
            string[,] ColumnsTitle =
            {
                {"rdType","读者类别"},{"rdTypeName","读者类别名"}, {"CanLendQty","可借书数量"},
                {"CanLendDay","可借书天数" }, {"CanContinueTimes","可续借次数"}, {"PunishRate","罚款率"},
                {"DateValid","证书有效期"}
            };
            for (int i = 0; i < ColumnsTitle.Length / 2; i++)
            {
                if (columnName == ColumnsTitle[i, 0])
                    return ColumnsTitle[i, 1];
            }
            return columnName;
        }
    }
}
